About 653 letters

About 3 minutes

#ord

Description: Convert a single Unicode character string to its integer code. See also the chr function.

def ord(x: str): ''' Convert a single Unicode character string to its integer code :param x: A single Unicode character string :return: The code of the single Unicode character '''

Example:

print('The code of A is', ord('A')) print('The code of 甲 is', ord('甲'))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Created in 6/9/2025

Updated in 6/9/2025